#!/bin/sh

# ----------------------------------------------------------------------------
# Script maintaining versions
#
# Bump up next build development version.
# ----------------------------------------------------------------------------

find_basedir() {
  local basedir=$(cd -P -- "$(dirname -- "$0")" && cd .. && cd .. && pwd -P)
  echo "${basedir}"
}

export PROJECTBASEDIR=$(find_basedir)

(cd $PROJECTBASEDIR && ./mvnw build-helper:parse-version versions:set -DprocessAllModules=false -DgenerateBackupPoms=false -DnewVersion='${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.nextIncrementalVersion}-SNAPSHOT' && ./mvnw -pl spring-cloud-dataflow-dependencies build-helper:parse-version versions:set -DprocessAllModules=false -DgenerateBackupPoms=false -DnewVersion='${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.nextIncrementalVersion}-SNAPSHOT')

